home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / uw_1.exe / UW_HELP1.HLP < prev    next >
Text File  |  1992-11-03  |  31KB  |  715 lines

  1. `co(4,7);─────────────────────────── /// Structures/Globals ───────────────────────────`color();
  2.  
  3.  ┌──────────────────────────────────────────────────────────────────────────┐    
  4.  │                  `keyword(RECT,/// RECT);                                                         `keyword(WINDOW,/// WINDOW);                                                     │
  5.  │                  `keyword(EVENT,/// EVENT);                                                      `keyword(M_RESET,/// M_RESET);                                               │
  6.  │                  `keyword(M_LOC,/// M_LOC);                                                      `keyword(M_MOVE,/// M_MOVE);                                                  │
  7.  │                  `keyword(PRINT,/// PRINT);                                                      `keyword(MENU,/// MENU);                                                      │
  8.  │                  `keyword(Video Globals,/// Video Globals);                                      `keyword(Event Globals,/// Event Globals);                                      │
  9.  │                  `keyword(Default Attributes,/// Default Attributes);                             `keyword(Cursor Globals,/// Cursor Globals);                                    │
  10.  │                  `keyword(DesqView Globals,/// DesqView Globals);                                 `keyword(Manager Globals,/// Manager Globals);                                 │
  11.  │                  `keyword(Function Globals,/// Function Globals);                                 `keyword(Printer Globals,/// Printer Globals);                                 │
  12.  │                  `keyword(Timer Globals,/// Timer Globals);                                    `keyword(Graphics Globals,/// Graphics Globals);                                 │
  13.  │                  `keyword(EGA/VGA Globals,/// EGA/VGA Globals);                                                                                                   │
  14.  └──────────────────────────────────────────────────────────────────────────┘
  15.  
  16.       These are the structures and global variables that are used in the
  17.     UltraWin library.  The structures defined are used for windowing, mouse
  18.     and printer support.  The globals are used for screen and video,
  19.     Desqview/Windows compatibility, graphics, timer and sound control,
  20.     background processing, dynamically queued RAM-based or disk-based
  21.     printing, and the window manager.  Include the UW.H file for access to the
  22.     structures, and the UW_GLOBX.H file for access to the globals.
  23.  
  24. `co(10,1);/// RECT`co();
  25. `co(11,1);  typedef struct rect_struct
  26.     {
  27.         int x_min, x_max, y_min, y_max;
  28.     } RECT;`co();
  29.  
  30.       This structure is used for general screen and window area definition,
  31.     and is used internally by the WINDOW structure.  We supply several useful
  32.     rectangle functions you may wish to utilize in your own code.  Refer to
  33.   the `keyword(Rectangle Functions,[uw_help4.hlp]/// Rectangle Functions); section for more information.
  34.  
  35. `co(10,1);/// WINDOW`co();
  36.  
  37. `co(15,?);  typedef struct w_struct
  38.     {
  39.         struct w_struct    *next;                         /* next window in linked list      */
  40.         struct w_struct    *previous;                 /* previous window in list                */
  41.         RECT                        pane;              /* the window rectangle          */
  42.         RECT                        old_pane;          /* for full size toggle          */
  43.         int                            rows;                             /* save buffer rows and columns    */
  44.         int                            cols;
  45.         int                         csr_x;             /* the "soft" cursor location    */
  46.         int                         csr_y;
  47.         uchar                        att;               /* the window's attribute        */
  48.         uchar                        bdr_att;           /* the window's border attribute */
  49.         int                         bdr_style;         /* the border style              */
  50.         int                         name_loc;                     /* CENTERED, LEFTJUST, RIGHTJUST    */
  51.         char                        *name;             /* pointer to window name        */
  52.         uchar                        *save;                         /* pointer to save buffer area        */
  53.         uchar                        *buff;                         /* pointer to write buffer area    */
  54.         uchar                        *mask;                         /* pointer to window buffer mask    */
  55.  
  56.         uchar           *tabs;                         /* tab stops                     */
  57.         int                            reg_s, reg_e;             /* scroll region start and end        */
  58.  
  59.         unsigned                hidden            : 1;   /* 1 if window hidden            */
  60.         unsigned                overlapped    : 1;   /* 1 if window overlapped        */
  61.         unsigned                csr_adv            : 1;     /* 1 if cursor auto advanced         */
  62.         unsigned                 inside      : 1;     /* 1 if bordered and inside          */
  63.         unsigned                 mask_on     : 1;     /* 1 if window mask is active        */
  64.         unsigned                popup                :    1;     /* 1 if window is popup                    */
  65.         unsigned                 scroll      : 1;     /* 1 if window auto-scrolls            */
  66.         unsigned                bs_clear        : 1;     /* 1 if backspace is destructive    */
  67.  
  68.         unsigned                eol_wrap        : 1;     /* 1 if cursor wraps at end of ln*/
  69.         unsigned                 mgr_flag    : 1;     /* 1 if win in manager's list      */
  70.         unsigned                 set_flag    : 1;     /* 1 if window is set on screen  */
  71.         unsigned                 cr_flag     : 1;     /* 1 if cr processed                */
  72.         unsigned                 lf_flag     : 1;     /* 1 if lf processed                */
  73.         unsigned                 cr_lf_flag  : 1;     /* 1 if cr or lf act as cr/lf         */
  74.         unsigned                 bk_flag     : 1;     /* 1 if backspace processed      */
  75.         unsigned                 tab_flag    : 1;     /* 1 if tab processed            */
  76.  
  77.         unsigned                 bell_flag   : 1;     /* 1 if bell char processed      */
  78.         unsigned                w_wrap            : 1;     /* 1 if word wrap on                         */
  79.         unsigned                unused            : 14;
  80.  
  81.         void            *usr_ptr;            /* user expansion pointer        */
  82.         uchar           usr_exp[4];                 /* user expansion space                    */
  83.                                        /* DO NOT USE BELOW VARIABLES    */
  84.         void            *sys_ptr;          /* system expansion pointer      */
  85.         uchar           sys_exp[4];                 /* system expansion space                */
  86.     } WINDOW;`co();
  87.  
  88.         This structure is used by the UltraWin library for all window
  89.     operations.  The structure is used internally by the library, so the
  90.     information above is mainly shown to satisfy any curiosity.
  91.  
  92.     Starting with version 2.00 of UltraWin, the tabs for the window are
  93.     allocated on window creation.  The tabs are now as large as the width of
  94.     the window, saving space over the 132 bytes used by previous versions. You
  95.     will notice that starting with 2.00 both user-defined and system pointers
  96.     and expansion areas have been added.  Please do not access the system
  97.     additions as we will be using these in future versions.
  98.  
  99.       It is recommended that these structure elements be accessed by the
  100.     functions provided, where available, and not directly.    This allows us to
  101.     change and enhance the package in the future while maintaining
  102.     compatibility with your code.
  103.  
  104. `co(10,1);/// EVENT`co();
  105. `co(11,1);  typedef struct event_struct
  106.     {
  107.         int         is_mouse;
  108.         int         key;
  109.         int         mod;
  110.         int         m_x, m_y;
  111.         int         m_count, m_button;
  112.     } EVENT;`co();
  113.  
  114.         This structure is used by the global variable "Event", which is used by
  115.     wait_event and event_pending to return information.
  116.     
  117.       The "is_mouse" member is used as a boolean to indicate if the event was
  118.     a keyboard event (is_mouse=0) or a mouse event (is_mouse=1).
  119.     
  120.       The "key" member will contain the key value, and the member "mod" will
  121.     contain bit settings to indicate if a key combination was used. This
  122.     includes the left and right shift combinations, Ctrl or Alt combinations,
  123.     and whether Scroll Lock, Num Lock, or Caps Lock are set (see UW_KEYS.H for
  124.     defines).
  125.     
  126.       The "m_x" and "m_y" members will contain the x,y coordinate (from
  127.     0..V_cols-1 for x, 0..V_rows-1 for y) of the mouse event, "m_count" will
  128.     contain the number of presses, and "m_button" has the define for the
  129.     button pressed (LB, MB, or RB).
  130.  
  131. `co(10,1);/// M_RESET`co();
  132. `co(11,1);  typedef struct reset_struct
  133.     {
  134.         int exists;
  135.         int n_buttons;
  136.     } M_RESET;`co();
  137.  
  138.       This structure is used internally by the init_mouse and end_mouse
  139.     functions. It is used when starting or ending the program, and when first
  140.     called returns whether or not the mouse is available.  The function
  141.     init_mouse uses this structure to set the global Mouse_exists boolean
  142.     variable.
  143.  
  144. `co(10,1);/// M_LOC`co();
  145. `co(11,1);  typedef struct loc_struct
  146.     {
  147.         int button_status;
  148.         int count;
  149.         int col;
  150.         int row;
  151.     } M_LOC;`co();
  152.     
  153.       This structure is used by m_pos, m_pressed, and m_released, as well as
  154.     internally by event_pending.  If you want to handle the mouse yourself,
  155.     bypassing UltraWin's event handling capability, use the m_pos, m_pressed
  156.     and m_released functions to get mouse pressed and coordinate information
  157.     using a variable of type M_LOC.
  158.  
  159. `co(10,1);/// M_MOVE`co();
  160. `co(11,1);  typedef struct move_struct
  161.     {
  162.         int h_count;
  163.         int v_count;
  164.     } M_MOVE;`co();
  165.  
  166.       This structure is used only by the m_motion function, which reports the
  167.     net movement of the mouse cursor between m_motion calls.
  168.  
  169. `co(10,1);/// MENU`co();
  170. `co(1